package com.haiberg.framework.util;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

import org.apache.log4j.Logger;


public class DateUtil {
	private static final Logger logger = Logger.getLogger(DateUtil.class);
	public static final String dateFormator_yyyyMMdd_HHmmss = "yyyy-MM-dd HH:mm:ss";
	public static Date getFormattedDate()
	{
		SimpleDateFormat formator = new SimpleDateFormat(dateFormator_yyyyMMdd_HHmmss);
		String dateStr = formator.format(new Date());
		try {
			return formator.parse(dateStr);
		} catch (ParseException e) {
			e.printStackTrace();
			logger.error("----------------"+e.getMessage());
		}
		return null;
	}
}	
